package com.lft.com.oilgas.util;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FenYeInteceptor {


    /**
     * 我们需要把这个方法的返回值 放到spring容器中
     * @return
     */
    @Bean
    public MybatisPlusInterceptor xx(){
        MybatisPlusInterceptor mpi = new MybatisPlusInterceptor();
        mpi.addInnerInterceptor(new PaginationInnerInterceptor());

        return mpi;
    }
}